Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor parameter constructor #455

Conversation

Bai-Li-NOAA
Copy link
Contributor

What is the feature?

  • refactor the parameter constructor

How have you implemented the solution?

Updated the code to below:

Parameter(double value_m, double min_m, double max_m, bool estimated_m)
        : value(value_m), min(min_m), max(max_m), estimated(estimated_m) {}

Does the PR impact any other area of the project?

NA

How to test this change

All tests have passed. see GHA logs here: https://github.com/NOAA-FIMS/FIMS/actions?query=branch%3A218-refactor-refactor-values-min-max-and-estimated-from-the-parameter-constructor

Developer pre-PR checklist

  • I relied on GitHub actions to 🧪 things for me while I sat on the 🛋️.

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (bf9932a) 81.75% compared to head (749155d) 81.75%.

❗ Current head 749155d differs from pull request most recent head 6ee5ab6. Consider uploading reports for the commit 6ee5ab6 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #455   +/-   ##
=======================================
  Coverage   81.75%   81.75%           
=======================================
  Files          37       37           
  Lines        2006     2006           
=======================================
  Hits         1640     1640           
  Misses        366      366           
Files Changed Coverage Δ
...nterface/rcpp/rcpp_objects/rcpp_interface_base.hpp 40.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msupernaw
Copy link
Contributor

msupernaw commented Aug 22, 2023 via email

@Bai-Li-NOAA Bai-Li-NOAA marked this pull request as draft August 22, 2023 22:11
@Bai-Li-NOAA Bai-Li-NOAA force-pushed the 218-refactor-refactor-values-min-max-and-estimated-from-the-parameter-constructor branch from 6ee5ab6 to 3035bd4 Compare September 13, 2023 16:10
@Bai-Li-NOAA
Copy link
Contributor Author

Thank you, @msupernaw for your suggestions. There was a display issue with your previous comment, but I've updated it.

In the revised code, "_m" as a prefix for members of the Parameter class has been used. Additionally, the relevant code sections within the selectivity, recruitment, maturity, and TMB interfaces have been updated.

Do we need to consider adding "interface_" as a prefix to those members (see issue #411)? If it becomes necessary during the work on issue #411 , we can implement this change at that time.

@Bai-Li-NOAA Bai-Li-NOAA marked this pull request as ready for review September 13, 2023 16:36
@github-actions
Copy link
Contributor

Instructions for code reviewer

Hello reviewer, thanks for taking the time to review this PR!

  • Please use this checklist during your review, checking off items that you have verified are complete!
  • For PRs that don't make changes to code (e.g., changes to README.md or Github actions workflows), feel free to skip over items on the checklist that are not relevant. Remember it is still important to do a thorough review.
  • Then, comment on the pull request with your review indicating where you have questions or changes need to be made before merging.
  • Remember to review every line of code you’ve been asked to review, look at the context, make sure you’re improving code health, and compliment developers on good things that they do.
  • PR reviews are a great way to learn, so feel free to share your tips and tricks. However, for optional changes (i.e., not required for merging), please include nit: (for nitpicking) before making the suggestion. For example, nit: I prefer using a data.frame() instead of a matrix because...
  • Engage with the developer when they respond to comments and check off additional boxes as they become complete so the PR can be merged in when all the tasks are fulfilled. Make it clear when this has been reached by commenting on the PR with something like This PR is now ready to be merged, no changes needed.

Checklist

  • The PR is requested to be merged into the appropriate branch (typically main)
  • The code is well-designed.
  • The functionality is good for the users of the code.
  • Any User Interface changes are sensible and look good.
  • Parallel computing remains functional.
  • The code isn’t more complex than it needs to be.
  • The developer isn’t implementing things they might need in the future but don’t know they need now.
  • Code has appropriate unit tests.
  • Tests are well-designed.
  • The developer used clear names for everything.
  • Comments are clear and useful, and mostly explain why instead of what.
  • Code is appropriately documented (doxygen and roxygen).
  • The code conforms to our style guides.

Copy link
Contributor

@msupernaw msupernaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@Andrea-Havron-NOAA Andrea-Havron-NOAA merged commit f0ffffe into main Sep 21, 2023
@Andrea-Havron-NOAA Andrea-Havron-NOAA deleted the 218-refactor-refactor-values-min-max-and-estimated-from-the-parameter-constructor branch September 21, 2023 17:33
Bai-Li-NOAA added a commit that referenced this pull request Sep 25, 2023
* fix: refactor parameter constructor

* refactor: update members in the Parameter class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Refactor]: Refactor values, min, max, and estimated from the Parameter constructor
4 participants